﻿using com.guojin.core.io;
using com.guojin.core.io.message;
using System.Collections.Generic;
using com.guojin.mj.net.message.game;

namespace com.guojin.mj.net.message.login
{
    //解散房间结果
    public class DissolveRoomRet : Message
    {
        public static int TYPE = 7;
        public static int ID = 3;

        public string roomID { get; set; }
        public int totalChapter { get; set; } //总手数
        public int maxPot { get; set; } //最大Pot
        public int totalTakeIn { get; set; } //总带入
        public string bigCardType { get; set; } //本房间超大牌型,逗号隔开     "五花牛，五小牛，炸弹"
        public List<DissolveRoomPlayerInfo> delRoomPlayerList;
        public List<OptionEntry> playerList;

        public void decode(Input _in)
        {

            roomID = _in.readString();
            totalChapter = _in.readInt();
            maxPot = _in.readInt();
            totalTakeIn = _in.readInt();
            bigCardType = _in.readString();
            delRoomPlayerList = new List<DissolveRoomPlayerInfo>();
            delRoomPlayerList = _in.readList<DissolveRoomPlayerInfo>(_in);
            playerList = new List<OptionEntry>();
            playerList = _in.readList<OptionEntry>(_in);
        }

        public void encode(Output _out)
        {
        }

        public int getMessageId()
        {
            return ID;
        }

        public int getMessageType()
        {
            return TYPE;
        }

        public string toString()
        {
            return "DissolveRoomRet[roomID=" + roomID + "totalChapter=" + totalChapter + "maxPot=" + maxPot +
                   "totalTakeIn=" + totalTakeIn + "bigCardType=" + bigCardType + ", ]"; 
        }
    }
}